home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / sox / Makefile < prev    next >
Makefile  |  1994-08-01  |  3KB  |  127 lines

  1.  
  2. # Sound Tools Makefile
  3. #     builds libst.a and sox
  4.  
  5. FSRC= raw.c voc.c au.c sf.c aiff.c hcom.c 8svx.c sndrtool.c wav.c \
  6.     smp.c sbdsp.c auto.c
  7. ESRC= copy.c avg.c pred.c stat.c vibro.c echo.c rate.c band.c lowp.c \
  8.     highp.c reverse.c
  9. PSRC= sox.c
  10.  
  11. SOURCES   = $(PSRC) $(FSRC) $(ESRC) handlers.c libst.c misc.c getopt.c
  12.  
  13. HEADERS   = st.h libst.h sfheader.h patchlvl.h 
  14.  
  15. TESTS     = tests.sh testall.sh monkey.au monkey.voc
  16.  
  17. MISC      = README INSTALL TODO sox.man sox.txt st.man Makefile.unx \
  18.         Makefile.bor sbprog.doc 
  19.  
  20. SKEL      = skel.c skeleff.c
  21.  
  22. VMS       = descrip.mms sound2au.com sound2sun.c sound2sun.opt \
  23.         sox.opt tests.com vms.lis
  24.  
  25. AMIGA      = Makefile.ami amiga.c amiga.h
  26.  
  27. FILES     = $(MISC) $(HEADERS) $(SOURCES) $(VMS) $(AMIGA) $(SKEL) $(TESTS)
  28.  
  29. FOBJ= raw.o voc.o au.o sf.o aiff.o hcom.o 8svx.o sndrtool.o wav.o \
  30.     smp.o sbdsp.o auto.o
  31. EOBJ= copy.o avg.o pred.o stat.o vibro.o echo.o rate.o band.o lowp.o \
  32.     highp.o reverse.o
  33.  
  34. SOUNDLIB  = libst.a
  35. LIBOBJS   = $(FOBJ) $(EOBJ) handlers.o libst.o misc.o getopt.o
  36.  
  37. #
  38. # System dependency parameters
  39. #     not many, we don't mess with devices
  40. #
  41. # include -DSYSV for AT&T Unix System V
  42.  
  43. # define -DBLASTER to use the Sound Blaster device driver
  44. # on a 386 AT&T Unix with it installed
  45.  
  46. # define -DSBLAST to use Steve Haenichen's SBLAST
  47. # driver on any BSD-derived Unix for 386/486 PC's
  48. # BSDI's BSD386, Jolitz 386BSD, or Mt Xinu's Mach-386
  49.  
  50. # define -DDOS  to compile on PC
  51. # defines .snd to mean a DOS soundtool file (starts with SOUND)
  52.  
  53. # define -DNeXT on a NeXT workstation
  54. # defines .snd to mean a NeXT sound format file
  55. #      only knows a few real sound formats.
  56.  
  57. # define -DMAC on a MacIntosh
  58. # defines .snd to mean a Mac-style headerless unsigned byte
  59. #      sample, probably at 11050 hertz.  You'll have to set 
  60. #    the speed on the command line.
  61.  
  62.  
  63. # My AT&T System V/386 development parameters
  64.  
  65. O=-g        # optimization flags
  66.  
  67. # CFLAGS    = $O -DSYSV -DBLASTER -Di386
  68. # CC      = cc
  69. # CC        = gcc -fpcc-struct-return -ansi -Dunix
  70. # AR        = ar r
  71. # RANLIB    = ar ts
  72.  
  73. # AT&T System V
  74.  
  75. CFLAGS    = $O -DSYSV 
  76. # Gcc is better, of course, if you have it
  77. # CC        = gcc -ansi -Dunix -fpcc-struct-return
  78. # CC        = cc
  79. AR        = ar r
  80. RANLIB    = ar ts
  81.  
  82. # BSD-ish, salt to taste
  83. # Sun, NeXT, Vax, Ultrix uses these
  84.  
  85. # CFLAGS    = $O 
  86. # CC        = gcc -ansi -Dunix 
  87. # CC        = cc
  88. # AR        = ar r
  89. # RANLIB    = ranlib
  90.  
  91. # BSD-386, Mach 386, 386BSD, use for SBLAST driver
  92.  
  93. # CFLAGS    = $O -I/usr/src/sys -DSBLAST
  94. # CC        = /usr/local/bin/gcc -ansi -Dunix 
  95. # AR        = ar r
  96. # RANLIB    = ranlib
  97.  
  98. all: sox
  99.  
  100. sox: sox.o $(SOUNDLIB)
  101.     $(CC) $(CFLAGS) -o sox sox.o $(SOUNDLIB) -lm
  102.  
  103. $(SOUNDLIB): $(LIBOBJS)
  104.     rm -f $(SOUNDLIB)
  105.     $(AR) $(SOUNDLIB) $(LIBOBJS)
  106.     $(RANLIB) $(SOUNDLIB)
  107.  
  108. sox.o:        sox.c st.h
  109.  
  110. $(LIBOBJS):    st.h
  111.  
  112. sox.txt: sox.man st.man
  113.     rm -f sox.txt
  114.     nroff -man sox.man | col > sox.txt
  115.     nroff -man st.man | col > st.txt
  116.  
  117. clean:
  118.     rm -f *.o
  119.     rm -f *.raw
  120.     rm -f *.sf
  121.     rm -f core
  122.  
  123. # Shar: -F (prefix all lines with X), 
  124. #     -s addr (set return addr of poster)
  125. shar: $(FILES)
  126.     /usr2/tools/shar/shar -M -F -l 50 -o shar -n soundtools_v6 -s thinman@netcom.com $(FILES)
  127.